#include "CApp.h"

CApp::CApp()
{
	m_SDLDisplay	= NULL;
	m_Yoshi			= NULL;
	m_bIsRunning	= true;
}
int CApp::OnExecute()
{
	if(OnInit() == false)
	{
		return -1;
	}
	SDL_Event Event;

	while(m_bIsRunning)
	{
		while(SDL_PollEvent(&Event))
		{
			OnEvent(&Event);  // Handles Events
		}

		OnLoop();	 // Executes Game Loop
		OnRender();  // Executes Render Code
	}

	OnCleanup();   // Cleans up the game
	return 0;
}

int main(int argc, char* args[])
{
	CApp theApp;

	return theApp.OnExecute();
}